import { Modal } from '@ant-design/react-native';
import LoginStore from '@/stores/loginStore';

let prompting = false;
export default function LogoutPrompt() {
  //const loginStore = LoginStore.useStore();
  if (prompting) {
    return;
  }
  prompting = true;
  Modal.alert('后台授权失效', '无法获取请求结果, 请确定后重新登录', [
    {
      text: '确定',
      onPress: () => {
        LoginStore.logoutUser();
        prompting = false;
      },
    },
  ]);
}
